package structuralPattern.decorator.example02;

public class Test02 {
    public static void main(String[] args) {
        String info = "name:tom,age:30";

        DataLoder dataLoder = new BaseFileDataLoader("d:demo.txt");

//        dataLoder.write(info);
//        String read = dataLoder.read();
//        System.out.println(read);

        DataLoaderDecorator decorator = new EncryptionDataDecorator(dataLoder);
        decorator.write(info);
        String read = decorator.read();
        System.out.println(read);
    }
}
